package com.wyp.service.impl;

import com.wyp.mapper.ScoresMapper;
import com.wyp.pojo.Scores;
import com.wyp.service.ScoresService;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;

import java.util.List;
import java.util.Map;
@Service
public class ScoresServiceImpl implements ScoresService {

    @Autowired
    private ScoresMapper scoresMapper;

    @Override
    public List<Map<String, Object>> qureyAllScores() {
        return scoresMapper.qureyAllScores();
    }

    @Override
    public Scores qureyScoresByRepeat(int stuid, int testpaperid) {
        return scoresMapper.qureyScoresByRepeat(stuid,testpaperid);
    }

    @Override
    public List<Map<String, Object>> qureyScoresByStuid(int stuid) {
        return scoresMapper.qureyScoresByStuid(stuid);
    }

    @Override
    public List<Map<String, Object>> qureyScoresByReach(int stuid) {
        return scoresMapper.qureyScoresByReach(stuid);
    }

    @Override
    public List<Map<String, Object>> qureyScoresByStuTest(int stuid, String testpapername) {
        return scoresMapper.qureyScoresByStuTest(stuid,testpapername);
    }

    @Override
    public Map<String, Object> qureyScoresByScoresid(int scoid) {
        return scoresMapper.qureyScoresByScoresid(scoid);
    }

    @Override
    public List<Map<String, Object>> qureyScoresByStuname(String stuname) {
        return scoresMapper.qureyScoresByStuname(stuname);
    }

    @Override
    public List<Map<String, Object>> qureyScoresByPapername(String testpapername) {
        return scoresMapper.qureyScoresByPapername(testpapername);
    }

    @Override
    public boolean addScores(Scores scores) {
        return (scoresMapper.addScores(scores) != 0);
    }

    @Override
    public boolean updateScores(Scores scores) {
        return (scoresMapper.updateScores(scores) != 0);
    }

    @Override
    public boolean deleteScores(Integer id) {
        return (scoresMapper.deleteScores(id) != 0);
    }
}
